﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterALSafa.Master" AutoEventWireup="true"
    CodeBehind="edit_evaluation.aspx.cs" Inherits="School.Pages.Evaluation.edit_evaluation" %>

<%@ Register Src="../UserControls/evaluation.ascx" TagName="evaluation" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <table style="width: 100%">
        <tr>
            <td style="width: 270px">
                &nbsp;
            </td>
            <td align="center" colspan="2" rowspan="2">
                <uc1:evaluation ID="evaluation1" runat="server" />
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 270px">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 270px">
                &nbsp;
            </td>
            <td align="center">
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td style="width: 270px">
                &nbsp;
            </td>
            <td align="right">
                <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>
                        <br />
                        <asp:Label ID="Label1" runat="server"></asp:Label>
                        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" EnableViewState="False"
                            Width="500px" OnRowEditing="gridview1_rowedting" OnRowCancelingEdit="gridview1_rowcancelingedit"
                            OnRowDeleting="gridview1_rowdeleting" 
                            OnRowUpdating="GridView1_RowUpdating" ViewStateMode="Disabled">
                            <Columns>
                                <asp:TemplateField HeaderText="اسم التقيم">
                                    <ItemTemplate>
                                        <asp:Label ID="l_eva_name" Text='<%# Bind("Name") %>' runat="server" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="t_eva_name" Text='<%# Bind("Name") %>' runat="server" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                            ControlToValidate="t_eva_name" ErrorMessage="يجب ادخال الاسم " ForeColor="Red" 
                                            ValidationGroup="s"></asp:RequiredFieldValidator>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="الدرجه العظمى">
                                    <ItemTemplate>
                                        <asp:Label ID="l_max_degree" Text='<%# Bind("MaxDegree") %>' runat="server" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="t_max_degree" Text='<%# Bind("MaxDegree") %>' runat="server" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                            ControlToValidate="t_max_degree" ErrorMessage="يجب ادخال قيمة الدرجه العظمى" 
                                            ForeColor="Red" ValidationGroup="s"></asp:RequiredFieldValidator>
                                        <br />
                                        <asp:CompareValidator ID="CompareValidator2" runat="server" 
                                            ControlToValidate="t_max_degree" 
                                            ErrorMessage="برجاء التاكد من ادخال الدرجه العظمى بطريقه صحيحه" ForeColor="Red" 
                                            Operator="DataTypeCheck" Type="Double"></asp:CompareValidator>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="الدرجه الصغرى">
                                    <ItemTemplate>
                                        <asp:Label ID="l_min_degree" Text='<%# Bind("MinDegree") %>' runat="server" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="t_min_degree" Text='<%# Bind("MinDegree") %>' runat="server" />
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                            ControlToValidate="t_min_degree" Display="Dynamic" 
                                            ErrorMessage="يجب ادخال قيمة الدرجه الصغرى" ForeColor="Red" ValidationGroup="s"></asp:RequiredFieldValidator>
                                        <br />
                                        <asp:CompareValidator ID="CompareValidator3" runat="server" 
                                            ControlToValidate="t_min_degree" 
                                            ErrorMessage="برجاء التاكد من ادخال الدرجه الصغرى بطريقه صحيحه" ForeColor="Red" 
                                            Operator="DataTypeCheck" Type="Double" ValidationGroup="s"></asp:CompareValidator>
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="l_id" Text='<%# Bind("Id") %>' runat="server" />
                                    </ItemTemplate>
                                    <EditItemTemplate>
                                        <asp:TextBox ID="t_id" Text='<%# Bind("Id") %>' runat="server" />
                                    </EditItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowEditButton="true" CausesValidation="false" HeaderText="تعديل"
                                    EditText="تعديل" ValidationGroup="s" />
                                <asp:CommandField ShowDeleteButton="true" CausesValidation="false" HeaderText="حذف"
                                    EditText="حذف" />
                            </Columns>
                        </asp:GridView>
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
                        <br />
                    </ContentTemplate>
                </asp:UpdatePanel>
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
        </tr>
    </table>
</asp:Content>
